/* General styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #2b5876, #4e4376);
    color: #ffffff;
    display: flex;
    height: 100vh;
}

.admin-dashboard {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 250px;
    background: #1e1e2f;
    padding: 20px;
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.5);
}

.sidebar h2 {
    color: #00d8ff;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li {
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
}

.sidebar nav ul li:hover,
.sidebar nav ul li.active {
    background: #00d8ff;
    color: #000;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.content-section {
    display: none;
}

.content-section:not(.hidden) {
    display: block;
}

.chart-box {
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
}

.gauge {
    height: 300px;
    width: 300px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0px 0px 10px 2px #00ffcc, 0px 0px 20px 5px rgba(0, 255, 255, 0.3);
    margin: auto;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(to right, #2b5876, #4e4376);
    z-index: 1000;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    width: 320px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.login-box h2 {
    color: #00d8ff;
    text-align: center;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #ffffff;
    font-size: 16px;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #00d8ff;
    border: none;
    border-radius: 5px;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background: #00b8d4;
}

/* 添加动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 历史记录区域样式 */
.history-section {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
}

.history-section h2 {
    color: #00d8ff;
    margin-bottom: 20px;
}

.history-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.history-filters select {
    padding: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #00d8ff;
    color: #ffffff;
    cursor: pointer;
}

.history-filters select:focus {
    outline: none;
    border-color: #00ffcc;
}

.history-table-container {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 5px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background: rgba(0, 216, 255, 0.1);
    color: #00d8ff;
    font-weight: normal;
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-table .status-normal {
    color: #00ff99;
}

.history-table .status-overspeed {
    color: #ff3333;
}

/* 自定义滚动条样式 */
.history-table-container::-webkit-scrollbar {
    width: 8px;
}

.history-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.history-table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 216, 255, 0.3);
    border-radius: 4px;
}

.history-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 216, 255, 0.5);
}